FROM golang:1.24 AS builder
LABEL authors="zyc"

WORKDIR /app
RUN go env -w  GOPROXY=https://goproxy.cn,direct
COPY . .
RUN go build -o /app/gpu-metrics-provider .

FROM ubuntu:22.04
LABEL authors="zyc"
WORKDIR /app
COPY --from=builder /app/gpu-metrics-provider /app/gpu-metrics-provider
COPY application.yaml /app/application.yaml

EXPOSE 8086
CMD ["/app/gpu-metrics-provider"]

